<template>
  <el-input-number v-model="num" @change="handleChange" :min="1"  label="描述文字" size="mini"   readonly></el-input-number>
</template>

<script>
  export default{
    data(){
      return{
          num: 1,
      }
    },
    props:["incount","goodsid"],
     methods:{
       handleChange(value) {
             //每当数量值改变，则立即把最新的数量同步到购物车的store中，覆盖之前的数量值
             this.$store.commit('updateGoodInfo',{id:this.goodsid,count:value})
             },
     }
  }
</script>

<style scoped>

</style>
